\(\int \csc (a+b x) \sqrt {\sin (2 a+2 b x)} \, dx\) [100]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F(-1)]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 20, antiderivative size = 53 \[ \int \csc (a+b x) \sqrt {\sin (2 a+2 b x)} \, dx=-\frac {\arcsin (\cos (a+b x)-\sin (a+b x))}{b}+\frac {\log \left (\cos (a+b x)+\sin (a+b x)+\sqrt {\sin (2 a+2 b x)}\right )}{b} \]

[Out]

-arcsin(cos(b*x+a)-sin(b*x+a))/b+ln(cos(b*x+a)+sin(b*x+a)+sin(2*b*x+2*a)^(1/2))/b

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {4393, 4390} \[ \int \csc (a+b x) \sqrt {\sin (2 a+2 b x)} \, dx=\frac {\log \left (\sin (a+b x)+\sqrt {\sin (2 a+2 b x)}+\cos (a+b x)\right )}{b}-\frac {\arcsin (\cos (a+b x)-\sin (a+b x))}{b} \]

[In]

Int[Csc[a + b*x]*Sqrt[Sin[2*a + 2*b*x]],x]

[Out]

-(ArcSin[Cos[a + b*x] - Sin[a + b*x]]/b) + Log[Cos[a + b*x] + Sin[a + b*x] + Sqrt[Sin[2*a + 2*b*x]]]/b

Rule 4390

Int[cos[(a_.) + (b_.)*(x_)]/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[-ArcSin[Cos[a + b*x] - Sin[a + b*
x]]/d, x] + Simp[Log[Cos[a + b*x] + Sin[a + b*x] + Sqrt[Sin[c + d*x]]]/d, x] /; FreeQ[{a, b, c, d}, x] && EqQ[
b*c - a*d, 0] && EqQ[d/b, 2]

Rule 4393

Int[((g_.)*sin[(c_.) + (d_.)*(x_)])^(p_)/sin[(a_.) + (b_.)*(x_)], x_Symbol] :> Dist[2*g, Int[Cos[a + b*x]*(g*S
in[c + d*x])^(p - 1), x], x] /; FreeQ[{a, b, c, d, g, p}, x] && EqQ[b*c - a*d, 0] && EqQ[d/b, 2] &&  !IntegerQ
[p] && IntegerQ[2*p]

Rubi steps \begin{align*} \text {integral}& = 2 \int \frac {\cos (a+b x)}{\sqrt {\sin (2 a+2 b x)}} \, dx \\ & = -\frac {\arcsin (\cos (a+b x)-\sin (a+b x))}{b}+\frac {\log \left (\cos (a+b x)+\sin (a+b x)+\sqrt {\sin (2 a+2 b x)}\right )}{b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.13 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.98 \[ \int \csc (a+b x) \sqrt {\sin (2 a+2 b x)} \, dx=-\frac {\arcsin (\cos (a+b x)-\sin (a+b x))}{b}+\frac {\log \left (\cos (a+b x)+\sin (a+b x)+\sqrt {\sin (2 (a+b x))}\right )}{b} \]

[In]

Integrate[Csc[a + b*x]*Sqrt[Sin[2*a + 2*b*x]],x]

[Out]

-(ArcSin[Cos[a + b*x] - Sin[a + b*x]]/b) + Log[Cos[a + b*x] + Sin[a + b*x] + Sqrt[Sin[2*(a + b*x)]]]/b

Maple [C] (verified)

Result contains higher order function than in optimal. Order 4 vs. order 3.

Time = 2.64 (sec) , antiderivative size = 157, normalized size of antiderivative = 2.96

method result size
default \(\frac {2 \sqrt {-\frac {\tan \left (\frac {a}{2}+\frac {x b}{2}\right )}{\tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}-1}}\, \left (\tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}-1\right ) \sqrt {\tan \left (\frac {a}{2}+\frac {x b}{2}\right )+1}\, \sqrt {-2 \tan \left (\frac {a}{2}+\frac {x b}{2}\right )+2}\, \sqrt {-\tan \left (\frac {a}{2}+\frac {x b}{2}\right )}\, \operatorname {EllipticF}\left (\sqrt {\tan \left (\frac {a}{2}+\frac {x b}{2}\right )+1}, \frac {\sqrt {2}}{2}\right )}{b \sqrt {\tan \left (\frac {a}{2}+\frac {x b}{2}\right ) \left (\tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}-1\right )}\, \sqrt {\tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{3}-\tan \left (\frac {a}{2}+\frac {x b}{2}\right )}}\) \(157\)

[In]

int(csc(b*x+a)*sin(2*b*x+2*a)^(1/2),x,method=_RETURNVERBOSE)

[Out]

2/b*(-tan(1/2*a+1/2*x*b)/(tan(1/2*a+1/2*x*b)^2-1))^(1/2)*(tan(1/2*a+1/2*x*b)^2-1)/(tan(1/2*a+1/2*x*b)*(tan(1/2
*a+1/2*x*b)^2-1))^(1/2)*(tan(1/2*a+1/2*x*b)+1)^(1/2)*(-2*tan(1/2*a+1/2*x*b)+2)^(1/2)*(-tan(1/2*a+1/2*x*b))^(1/
2)/(tan(1/2*a+1/2*x*b)^3-tan(1/2*a+1/2*x*b))^(1/2)*EllipticF((tan(1/2*a+1/2*x*b)+1)^(1/2),1/2*2^(1/2))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 242 vs. \(2 (51) = 102\).

Time = 0.27 (sec) , antiderivative size = 242, normalized size of antiderivative = 4.57 \[ \int \csc (a+b x) \sqrt {\sin (2 a+2 b x)} \, dx=\frac {2 \, \arctan \left (-\frac {\sqrt {2} \sqrt {\cos \left (b x + a\right ) \sin \left (b x + a\right )} {\left (\cos \left (b x + a\right ) - \sin \left (b x + a\right )\right )} + \cos \left (b x + a\right ) \sin \left (b x + a\right )}{\cos \left (b x + a\right )^{2} + 2 \, \cos \left (b x + a\right ) \sin \left (b x + a\right ) - 1}\right ) - 2 \, \arctan \left (-\frac {2 \, \sqrt {2} \sqrt {\cos \left (b x + a\right ) \sin \left (b x + a\right )} - \cos \left (b x + a\right ) - \sin \left (b x + a\right )}{\cos \left (b x + a\right ) - \sin \left (b x + a\right )}\right ) - \log \left (-32 \, \cos \left (b x + a\right )^{4} + 4 \, \sqrt {2} {\left (4 \, \cos \left (b x + a\right )^{3} - {\left (4 \, \cos \left (b x + a\right )^{2} + 1\right )} \sin \left (b x + a\right ) - 5 \, \cos \left (b x + a\right )\right )} \sqrt {\cos \left (b x + a\right ) \sin \left (b x + a\right )} + 32 \, \cos \left (b x + a\right )^{2} + 16 \, \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 1\right )}{4 \, b} \]

[In]

integrate(csc(b*x+a)*sin(2*b*x+2*a)^(1/2),x, algorithm="fricas")

[Out]

1/4*(2*arctan(-(sqrt(2)*sqrt(cos(b*x + a)*sin(b*x + a))*(cos(b*x + a) - sin(b*x + a)) + cos(b*x + a)*sin(b*x +
 a))/(cos(b*x + a)^2 + 2*cos(b*x + a)*sin(b*x + a) - 1)) - 2*arctan(-(2*sqrt(2)*sqrt(cos(b*x + a)*sin(b*x + a)
) - cos(b*x + a) - sin(b*x + a))/(cos(b*x + a) - sin(b*x + a))) - log(-32*cos(b*x + a)^4 + 4*sqrt(2)*(4*cos(b*
x + a)^3 - (4*cos(b*x + a)^2 + 1)*sin(b*x + a) - 5*cos(b*x + a))*sqrt(cos(b*x + a)*sin(b*x + a)) + 32*cos(b*x
+ a)^2 + 16*cos(b*x + a)*sin(b*x + a) + 1))/b

Sympy [F(-1)]

Timed out. \[ \int \csc (a+b x) \sqrt {\sin (2 a+2 b x)} \, dx=\text {Timed out} \]

[In]

integrate(csc(b*x+a)*sin(2*b*x+2*a)**(1/2),x)

[Out]

Timed out

Maxima [F]

\[ \int \csc (a+b x) \sqrt {\sin (2 a+2 b x)} \, dx=\int { \csc \left (b x + a\right ) \sqrt {\sin \left (2 \, b x + 2 \, a\right )} \,d x } \]

[In]

integrate(csc(b*x+a)*sin(2*b*x+2*a)^(1/2),x, algorithm="maxima")

[Out]

integrate(csc(b*x + a)*sqrt(sin(2*b*x + 2*a)), x)

Giac [F]

\[ \int \csc (a+b x) \sqrt {\sin (2 a+2 b x)} \, dx=\int { \csc \left (b x + a\right ) \sqrt {\sin \left (2 \, b x + 2 \, a\right )} \,d x } \]

[In]

integrate(csc(b*x+a)*sin(2*b*x+2*a)^(1/2),x, algorithm="giac")

[Out]

integrate(csc(b*x + a)*sqrt(sin(2*b*x + 2*a)), x)

Mupad [F(-1)]

Timed out. \[ \int \csc (a+b x) \sqrt {\sin (2 a+2 b x)} \, dx=\int \frac {\sqrt {\sin \left (2\,a+2\,b\,x\right )}}{\sin \left (a+b\,x\right )} \,d x \]

[In]

int(sin(2*a + 2*b*x)^(1/2)/sin(a + b*x),x)

[Out]

int(sin(2*a + 2*b*x)^(1/2)/sin(a + b*x), x)